package com.probox.customer.api.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.probox.common.core.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

@Data
@ApiModel(description="客户等级vo类")
public class CustomerLevelVo implements java.io.Serializable{
    /**
     * 会员级别ID
     */
    //默认主键自增
    @ApiModelProperty(value = "会员级别ID")
    @TableId(value = "LEVEL_ID", type = IdType.AUTO)
    private Long levelId;
    /**
     * 平台ID
     */
    @ApiModelProperty(value = "平台ID")
    @Excel(name = "平台ID")
    private Long platformId;
    /**
     * 客户等级
     */
    @ApiModelProperty(value = "客户等级",required = true)
    @Excel(name = "客户等级")
    private Integer customerGrade;
    /**
     * 客户模式
     */
    @ApiModelProperty(value = "客户模式",required = true)
    @Excel(name = "客户模式")
    private String customerPattern;
    /**
     * 级别名称
     */
    @ApiModelProperty(value = "级别名称",required = true)
    @Excel(name = "级别名称")
    private String levelName;

    /**
     * 卡面
     */
    @ApiModelProperty(value = "卡面",required = true)
    @Excel(name = "卡面")
    private String caedFace;
    /**
     * 级别背景色
     */
    @ApiModelProperty(value = "级别背景色")
    @Excel(name = "级别背景色")
    private String levelColor;
    /**
     * 级别图标
     */
    @ApiModelProperty(value = "级别图标")
    @Excel(name = "级别图标")
    private String levelImage;
    /**
     * 最小积分
     */
    @ApiModelProperty(value = "最小积分")
    @Excel(name = "最小积分")
    private Integer minScore;
    /**
     * 粉丝数量
     */
    @ApiModelProperty(value = "粉丝数量")
    @Excel(name = "粉丝数量")
    private Integer fansNumber;
    /**
     * 业绩
     */
    @ApiModelProperty(value = "业绩")
    @Excel(name = "业绩")
    private Long performance;

    /**
     * 付费规则ID
     */
    @ApiModelProperty(value = "付费规则ID")
    @Excel(name = "付费规则ID")
    private String ruleId;

    /**
     * 直接分拥比例
     */
    @ApiModelProperty(value = "直接分拥比例")
    @Excel(name = "直接分拥比例")
    private BigDecimal directPointsPoints;
    /**
     * 间接分拥比例
     */
    @ApiModelProperty(value = "间接分拥比例")
    @Excel(name = "间接分拥比例")
    private BigDecimal indirectPointsPoints;
    /**
     * 自购分拥比例
     */
    @ApiModelProperty(value = "自购分拥比例")
    @Excel(name = "自购分拥比例")
    private BigDecimal selfbuyPointsPoints;


    @ApiModelProperty(value = "权益")
    private List<CustomerLevelPrivleageVo> customerLevelPrivleageVos;

    @ApiModelProperty(value = "客户权益Vo集合")
    private List<CustomerPrivilegeVo> customerPrivileges;

    @ApiModelProperty(value = "付费规则集合")
    private List<PaymentRuleVo> paymentRules;

    public BigDecimal getDirectPointsPointsStr(){
        if(directPointsPoints != null){
            BigDecimal Hundred = new BigDecimal("100");
            return directPointsPoints.multiply(Hundred);
        }
        return null;
    }

    public BigDecimal getIndirectPointsPointsStr(){
        if(indirectPointsPoints != null){
            BigDecimal Hundred = new BigDecimal("100");
            return indirectPointsPoints.multiply(Hundred);
        }
        return null;
    }

    public BigDecimal getSelfbuyPointsPointsStr(){
        if(selfbuyPointsPoints != null){
            BigDecimal Hundred = new BigDecimal("100");
            return selfbuyPointsPoints.multiply(Hundred);
        }
        return null;
    }



}
